﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Navigation;

namespace eLearning
{
    public partial class MasterPage : Page
    {
		
        public MasterPage()
        {
            InitializeComponent();
			//this.Holder = new StudentRoom ();
		}
		
		public UIElement Holder
		{
			get {return this.PagePlaceHold.Children [0];}
			set 
			{
				this.PagePlaceHold.Children.Clear ();
				this.PagePlaceHold.Children.Add (value);
			}
		}

        // Executes when the user navigates to this page.
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }

        private void On_SignIn(object sender, System.Windows.RoutedEventArgs e)
        {
            SignIn signin = new SignIn();
            signin.Show();
        	// TODO: Add event handler implementation here.
        }

        private void On_SignUp(object sender, System.Windows.RoutedEventArgs e)
        {
            SignUp signUp = new SignUp();
            signUp.Show();
        	// TODO: Add event handler implementation here.
        }

        private void PageLoaded(object sender, System.Windows.RoutedEventArgs e)
        {
            Time_Date_Label.Visibility = Visibility.Collapsed;
        	this.Time_Date_Label.Content = "Day " + System.DateTime.Today.Day + "/" + System.DateTime.Today.Month + "/" + System.DateTime.Today.Year;
			// TODO: Add event handler implementation here.
        }

        private void On_SignOut(object sender, System.Windows.RoutedEventArgs e)
        {
        	// TODO: Add event handler implementation here.
        }

        private void On_OpenStudentRoom(object sender, System.Windows.RoutedEventArgs e)
        {
			this.Holder = new StudentRoom ();
        	// TODO: Add event handler implementation here.
        }

        private void On_OpenProfile(object sender, System.Windows.RoutedEventArgs e)
        {
			this.Holder = new UserProfile ();
        	// TODO: Add event handler implementation here.
        }

        private void On_GoLibrary(object sender, System.Windows.RoutedEventArgs e)
        {
        	// TODO: Add event handler implementation here.
        }
    }
}
